﻿@using System.Web.Optimization;
@model Everynet.Models.signUpModel
@{
    ViewBag.Title = "Signup - EveryNet - Canberra Internet Service Provider";
    Layout = "~/Views/Shared/_SignUpLayout.cshtml";
}

<div id='screen'></div>
    <div class="body-page">
    <h1 class="top-head">
        Welcome</h1>
    <h2 class="signup-form-heading">
        Signup step 1 of 6
    </h2>
    <div class="signup-form">
        <fieldset>
            <h1>
                EveryNet Broadband Application</h1>
            <p>
                Thank you for applying for a broadband account. The following 6 steps will guide
                you through selecting your plan, and providing us with the information we need to
                determine service availability, and setup your account.</p>
            <span class="floatright"><span class="red">*</span> these fields are required <span
                id='loadingmessage' class="displaynone">
                <img src="@Url.Content("~/Content/images/loading.gif")" alt="Please wait..."/>
            </span></span>
            <div id='loaderCenter' class="displaynone"> 
                <img src="@Url.Content("~/Content/images/ajax_loader_gray.gif")" alt="Please wait..." class="ajax-loader"/>
                <p class="loadertext">Please wait...</p>
            </div>
            <br />
           
            @*<div>*@ Are you a new customer or are you already with us?
            <div class="editor-label">
                <label>@Html.RadioButtonFor(m => m.CheckCustomer, 1, new { id = "CheckCustomer_true", @checked = "checked" })<b>I'm
                    a New Customer</b></label>
              @*<label>@Html.RadioButtonFor(m => m.CheckCustomer, 2, new { id = "CheckCustomer_fasle" })
                    <b>I'm already with Everynet</b></label>*@
                <label>@Html.RadioButtonFor(m => m.CheckCustomer, 3, new { id = "CheckCustomer_truefasle" })
                    <b>Resume my application</b></label>
            </div>
            
              @using (Ajax.BeginForm("AlreadywithEverynet", "signUp", new AjaxOptions
                {
                    HttpMethod = "POST",
                    LoadingElementId = "loaderCenter",
                    OnSuccess = "successAlready"
                  
                }))
               {
                  <br />
                 <div id="divEverynetAlready" style="display: none;">
                   <h1>Login Details</h1>
                       <span id="logErrorAlready" class="validation-summary-errors"></span>
                    <table cellspacing="0" cellpadding="0" border="0" class="NoBorder">
                        <tbody>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        Email<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.Email)
                                        <br />
                                        @Html.ValidationMessageFor(m => m.Email)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.Password)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                         @Html.PasswordFor(m => m.Password, new { autocomplete = "off" })
                                        <br />
                                        @Html.ValidationMessageFor(m => m.Password)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td style="padding-top: 10px;">
                                    <input type="submit" value="Login" id="buttonbtnloginAlready" class="btncolor" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
               }
             
              @using (Ajax.BeginForm("ResumeLogin", "signUp", new AjaxOptions
                {
                    HttpMethod = "POST",
                    LoadingElementId = "loaderCenter",
                    OnSuccess = "success"
                  
                }))
               {
                  
                 <div id="divResume" style="display: none;">
                   <h1>Login Details</h1>
                       <span id="logError" class="validation-summary-errors"></span>
                    <table cellspacing="0" cellpadding="0" border="0" class="NoBorder">
                        <tbody>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        Email<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.Email)
                                        <br />
                                        @Html.ValidationMessageFor(m => m.Email)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.Password)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.PasswordFor(m => m.Password, new { autocomplete = "off" })
                                        
                                        <br />
                                        @Html.ValidationMessageFor(m => m.Password)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td>
                                </td>
                                <td style="padding-top: 10px;">
                                    <input type="submit" value="Login" id="buttonbtnlogin" class="btncolor" />
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>
               }

            @using (Html.BeginForm("InsertUpdateUsers", "signUp", FormMethod.Post, new { id = "mySignupForm" }))
            {
                @Html.AntiForgeryToken()
                <div id="divNewCustomer">
                 @Html.ValidationSummary()
                 @Html.HiddenFor(m => m.ID)
                    <h1>
                        Service Details</h1>
                    <p>
                        Where will the service be connected? we need to know your exact address, and it
                        has to all be spelled correctly or the service qualification will take longer.
                    </p>
                    <table cellspacing="0" cellpadding="0" border="0" class="NoBorder">
                        <tbody>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.ServiceAddress)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.ServiceAddress, new { @class = "checkvalidationAddress" })
                                        <div id="serviceaddressValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.ServiceAddress)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.ServicePhoneNumber)<span class="red" id="spnServicePhnNum">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.ServicePhoneNumber, new { @class = "checkvalidationinteger" })
                                        <div id="servicephnValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.ServicePhoneNumber)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        Customer Type
                                    </div>
                                </td>
                                <td>
                                    <div class="Customer-type">
                                        <label>@Html.RadioButtonFor(m => m.UserTypeID, 1, new { id = "CheckCustomerType_true", @checked = "checked" })
                                            Residential</label>
                                        <label>@Html.RadioButtonFor(m => m.UserTypeID, 2, new { id = "CheckCustomerType_fasle" })
                                            Business</label>
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                    <h1>
                        About You</h1>
                    <table>
                        <tbody>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.Title)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div>
                                        @Html.DropDownListFor(m => m.SelectedTitleItem, Model.SelectedTitle, "Select Title", new { @class = "checkvalidationtitle" })
                                        <div id="selectedTitleValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.SelectedTitleItem)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.FirstName)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.FirstName, new { @class = "checkvalidationstring" })
                                        <div id="firstnameValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.FirstName)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.LastName)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.LastName, new { @class = "checkvalidationstring" })
                                        <div id="lastnameValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.LastName)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.MobileNumber)
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.MobileNumber, new { @class = "checkvalidationinteger" })
                                        <div id="mobileValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.MobileNumber)
                                    </div>
                                </td>
                            </tr>
                            <tr>
                                <td width="160">
                                    <div style="text-align: right;" class="label-taxt">
                                        @Html.LabelFor(m => m.Email)<span class="red">*</span>
                                    </div>
                                </td>
                                <td>
                                    <div class="input-box">
                                        @Html.TextBoxFor(m => m.Email, new { @class = "checkvalidationemail" })
                                        <div id="emailValidation" class="floatright successspace">
                                        </div>
                                        <br />
                                        @Html.ValidationMessageFor(m => m.Email)
                                    </div>
                                </td>
                            </tr>
                        </tbody>
                    </table>
                </div>

                   
@*</div>*@
                @Html.Hidden("hdnCheckvalidationString", @Url.Action("CheckvalidationString", "signUp"))
                @Html.Hidden("hdnCheckvalidationInteger", @Url.Action("CheckvalidationInteger", "signUp"))
                @Html.Hidden("hdnCheckvalidationEmail", @Url.Action("CheckvalidationEmail", "signUp"))
                @Html.Hidden("hdnCheckvalidationAddress", @Url.Action("CheckvalidationAddress", "signUp"))
                @Html.Hidden("hdnCheckvalidationTitle", @Url.Action("CheckvalidationTitle", "signUp"))
                @Html.Hidden("hdnTick", @Url.Content("~/Content/images/tick.png"))
                @Html.Hidden("hdnCross", @Url.Content("~/Content/images/cross.png"))

                @Html.Hidden("hdnNaked", @Everynet.Models.signUpModel.enumNoServiceNumber.Naked.ToString())
                @Html.Hidden("hdnBundle", @Everynet.Models.signUpModel.enumNoServiceNumber.Bundle.ToString())
            
                <div>
                    <input type="submit" value="Next" id="buttonbtn" class="btncolor" />
                </div>
            }
        </fieldset>
    </div>
</div>

@section JavaScriptSignUp
{
 @Scripts.Render("~/Scripts/BundledScriptsSignupHome")
}



